/*
 * @Author: jiely
 * @Date: 2022-02-11 14:39:26
 * @LastEditors: jiely
 * @LastEditTime: 2022-02-11 17:09:13
 * @Description: file content
 * @FilePath: \er-pc-jie\src\api\user.js
 */

import request from '@/utils/request'

/**
 * //账号密码登录
 * @func: func
 * @param {*} account  账号
 * @param {*} password  密码
 * @return {*}
 */
export const userAccountLogin = ({ account, password }) => {
  return request('/login', 'post', { account, password })
}

/** // 获取手机的短信验证码
 * @func: func
 * @param {*} mobile
 * @return {*}
 */
export const userMobileLoginMsg = (mobile) => {
  return request('/login/code', 'get', { mobile })
}

/**  手机号验证码登录
 * @func: func
 * @param {*} mobile
 * @param {*} code
 * @return {*}
 */
export const userMobileLogin = ({ mobile, code }) => {
  return request('/login/code', 'post', { mobile, code })
}
